package com.ruoyi.technician.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.technician.mapper.TechnicianTypeMapper;
import com.ruoyi.technician.domain.TechnicianType;
import com.ruoyi.technician.service.ITechnicianTypeService;

/**
 * 技师类型Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-07
 */
@Service
public class TechnicianTypeServiceImpl implements ITechnicianTypeService 
{
    @Autowired
    private TechnicianTypeMapper technicianTypeMapper;

    /**
     * 查询技师类型
     * 
     * @param id 技师类型主键
     * @return 技师类型
     */
    @Override
    public TechnicianType selectTechnicianTypeById(Long id)
    {
        return technicianTypeMapper.selectTechnicianTypeById(id);
    }

    /**
     * 查询技师类型列表
     * 
     * @param technicianType 技师类型
     * @return 技师类型
     */
    @Override
    public List<TechnicianType> selectTechnicianTypeList(TechnicianType technicianType)
    {
        return technicianTypeMapper.selectTechnicianTypeList(technicianType);
    }

    /**
     * 新增技师类型
     * 
     * @param technicianType 技师类型
     * @return 结果
     */
    @Override
    public int insertTechnicianType(TechnicianType technicianType)
    {
        technicianType.setCreateTime(DateUtils.getNowDate());
        return technicianTypeMapper.insertTechnicianType(technicianType);
    }

    /**
     * 修改技师类型
     * 
     * @param technicianType 技师类型
     * @return 结果
     */
    @Override
    public int updateTechnicianType(TechnicianType technicianType)
    {
        technicianType.setUpdateTime(DateUtils.getNowDate());
        return technicianTypeMapper.updateTechnicianType(technicianType);
    }

    /**
     * 批量删除技师类型
     * 
     * @param ids 需要删除的技师类型主键
     * @return 结果
     */
    @Override
    public int deleteTechnicianTypeByIds(Long[] ids)
    {
        return technicianTypeMapper.deleteTechnicianTypeByIds(ids);
    }

    /**
     * 删除技师类型信息
     * 
     * @param id 技师类型主键
     * @return 结果
     */
    @Override
    public int deleteTechnicianTypeById(Long id)
    {
        return technicianTypeMapper.deleteTechnicianTypeById(id);
    }
}
